<?php $this->placeholder('onReady')->captureStart() ?>

$('a.button').button();


$(".tareasdelete").live("click", function(e){
    	e.preventDefault();
    	var url=this.href;
        var tr = $(this).closest('li');
       
    	$('#dialog-confirm').dialog({buttons: { 
				"Borrar": function() {
					$.post(url,  function(data){
						if(data.status=='ok'){
						    $('#dialog-confirm').dialog("close");  
							tr.hide();
							
						}
						else
						{
							alert(data);
							$('#dialog-confirm').dialog("close");
						}
					})
				} ,
				"Cancelar": function() { $(this).dialog("close"); } 
			}
		})
	    .dialog('open');  
    })
    .css('cursor','pointer')
    .button({
            text: false,
            icons: {
                primary: "ui-icon-trash"
            }
    });


    $(".lightbox").lightbox({
			    fitToScreen: true,
			    imageClickClose: false,
                displayDownloadLink: true
    });






<?php $this->placeholder('onReady')->captureEnd() ?>
<?$this->headScript()->offsetSetFile(100,$this->baseUrl('js/jquery.lightbox.js'));?>

<?$this->headLink()->appendStylesheet($this->baseUrl('css/lightbox.css'));?>


<?echo $this->msg($this->proyecto['proyecto'])?>
<div class="contenedor_tablesorter">
<table width="100%" class="tabla_descriptiva_proyecto">
<tbody>
<tr>
	<th class="ui-state-hover" width="25%"><?php echo $this->translate('Datacenter');?></th><td width="25%" class="ui-state-highlight"><?=$this->proyecto['zona']?></td>
	<th class="ui-state-hover"><?php echo $this->translate('Fecha Apertura');?></th><td class="ui-state-highlight"><?=$this->proyecto['f_inicio']?></td>

</tr>	
<tr>
	<th class="ui-state-hover" width="25%"><?php echo $this->translate('Area');?> / <?php echo $this->translate('Estado');?> / <?php echo $this->translate('Prioridad');?></th><td width="25%" class="ui-state-highlight"><?=$this->proyecto['area']?> / <?=$this->proyecto['estado']?> / <?=$this->proyecto['prioridad']?></td>
	<th class="ui-state-hover"><?php echo $this->translate('Fecha Entrega');?></th><td class="ui-state-highlight"><?=$this->proyecto['f_entrega']?></td>

</tr>	
<tr>
	<th class="ui-state-hover">&nbsp;<?php echo $this->translate('Responsable');?></th><td class="ui-state-highlight">&nbsp;<?=$this->proyecto['responsable']?></td>
	<th class="ui-state-hover">&nbsp;<?php echo $this->translate('Fecha Replanificación');?></th><td class="ui-state-highlight">&nbsp;<?=$this->$proyecto['f_repla']?></td>

</tr>	
<tr>
    <th class="ui-state-hover">&nbsp;<?php echo $this->translate('Oferta Asociada');?></th><td class="ui-state-highlight">&nbsp;<?=$this->link($this->proyecto['oferta'],'Gestion_OfertasTareas',array('id'=>$this->proyecto['id_oferta']))?></td>
	<th class="ui-state-hover">&nbsp;<?php echo $this->translate('Fecha Cierre');?></th><td class="ui-state-highlight">&nbsp;<?=$this->$proyecto['f_final']?></td>
</tr>
<tr>
	<th class="ui-state-hover">&nbsp;NOC</th><td class="ui-state-highlight">&nbsp;<?=$this->proyecto['file_noc'];?></td>
    <th class="ui-state-hover">&nbsp;<?php echo $this->translate('Importe NOC');?></th><td class="ui-state-highlight">&nbsp;<?=$this->proyecto['importe_noc'] ?></td>
</tr>
<tr>
    <th class="ui-state-hover">&nbsp;<?php echo $this->translate('Gestión Medio Ambiental');?></th><td class="ui-state-highlight">&nbsp;<?=$this->proyecto['gma_text'] ?></td>
	<th class="ui-state-hover">&nbsp;<?php echo $this->translate('Balance');?></th><td class="ui-state-highlight">&nbsp;<?=$this->proyecto['balance']?></td>
</tr>
<tr>
	<th class="ui-state-hover">&nbsp;<?php echo $this->translate('PRL');?></th>
    
    <td class="ui-state-highlight">&nbsp;<?php if($this->proyecto['prl'])
    echo $this->translate('Ver PRL').' '.$this->anchor('proyectosdc-prl/editar/id/'.$this->id_proyecto,'Formulario PRL',array('class'=>'utileditar'));?>
    
    </td>
    <th class="ui-state-hover">&nbsp;<?php echo $this->translate('Importe Comprometido');?></th><td class="ui-state-highlight">&nbsp;<?=$importe_comprometido ?></td>
    
 </tr>
<tr>
    <th class="ui-state-hover">&nbsp;<?php echo $this->translate('CMI');?></th><td class="ui-state-highlight">&nbsp;<?=$this->proyecto['cmi_text'] ?></td>
	<th class="ui-state-hover">&nbsp;<?php echo $this->translate('Control Económico');?></th>
    <td class="ui-state-highlight">&nbsp;
    
    <?if($this->proyecto['control_economico']=='CAPEX') {
        echo $this->anchor('/proyectosdc-capex-detalle/index/id_proyecto/'.$this->id_proyecto,'CAPEX',array('class'=>'button'));
    }else{
       echo $this->proyecto['control_economico'];
    } ?>
    </td>
</tr>
<tr>
    <th class="ui-state-hover">&nbsp;<?php echo $this->translate('Usuarios permitidos');?></th><td class="ui-state-highlight">&nbsp;<?=implode('<br>',$this->proyecto['permisos'])?></td>
    <th class="ui-state-hover">&nbsp;<?php echo $this->translate('Descripción');?></th><td colspan="2" class="ui-state-highlight">&nbsp;<?=$this->text($this->proyecto['notas'])?></td>	
</tr>
</tbody>		
</table>




<?php echo $this->anchor($this->controllerName.'/insertar/id_proyecto/'.$this->id_proyecto,'Añadir',array('class'=>'utiladd'));?>


<?php echo $this->partialLoop($this->controllerName.'/fila.phtml', (array)$this->rows); ?>
</div>